package com.xiaoge.biz.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoge.biz.entity.Product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xiaoge
 * @since 2021-03-21
 */
@Repository
public interface ProductMapper extends BaseMapper<Product> {

    IPage<Product> findProductStocks(Page<Product> page, @Param(Constants.WRAPPER) QueryWrapper<Product> queryWrapper);

    IPage<Product> getDetails(Page<Product> page, String inNum);

    IPage<Product> getOutDetails(Page<Product> page, String outNum);

    IPage<Product> findOutEnableStocks(Page<Product> page, @Param(Constants.WRAPPER) QueryWrapper<Product> queryWrapper);
}
